﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Pixysoft.Framework.Noebe.MemoryCaches.Core
{
    public class CacheSetting : ICacheSetting
    {
        string settingName;
        CacheMode cacheMode = CacheMode.ShallowCache;
        int timeSpan = -1;
        int maxCapacity = StringHelper.default_cache_maxcapacity;

        //no serialize
        INoebeManager manager;

        public CacheSetting()
        {
        }

        public CacheSetting(string settingName)
        {
            this.settingName = settingName;
        }

        public string SettingName
        {
            get { return settingName; }
            set { settingName = value; }
        }

        public CacheMode CacheMode
        {
            get { return cacheMode; }
            set { cacheMode = value; }
        }

        public int TimeSpan
        {
            get { return timeSpan; }
            set { timeSpan = value; }
        }

        public int MaxCapacity
        {
            get { return maxCapacity; }
            set { maxCapacity = value; }
        }

        public void SetManager(INoebeManager manager)
        {
            this.manager = manager;
        }

        public INoebeManager GetManager()
        {
            return manager;
        }
    }
}
